from django.urls import path
from firstplan.views import plan, everyday, point, reward, admin

app_name = "firstplan"

urlpatterns = [
    # path('admin/', admin.site.urls),

    # 登录
    path('login/', admin.login),
    path('logout/', admin.logout, name="logout"),
    path('login/image/', admin.login_image),
    path('login/pwd/', admin.forget_pwd, name="forget_pwd"),
    path('user/list/', admin.user_list, name="userlist"),
    path('user/add/', admin.user_add,name="user_add"),
    path('user/detail/', admin.user_detail),
    path('user/edit/', admin.user_edit),
    path('user/delete/', admin.user_delete),

    # firstplan
    path('plan/list/', plan.plan_list, name="planlist"),
    path('plan/add/', plan.plan_add),
    path('plan/detail/', plan.plan_detail),
    path('plan/edit/', plan.plan_edit),
    path('plan/delete/', plan.plan_delete),

    # everyday
    path('everyday/list/', everyday.everyday_list, name="everyday_list"),
    path('everyday/add/', everyday.everyday_add, name="everyday_add"),
    path('everyday/add2/', everyday.everyday_add2, name="everyday_add2"),
    path('everyday/<int:uid>/edit/', everyday.everyday_edit, name="everyday_edit"),
    path('everyday/<int:uid>/delete/', everyday.everyday_delete, name="everyday_delete"),

    # point
    path('point/', point.point, name="point"),
    path('point/<int:person>/<str:month>/detail/', point.point_detail, name="point_detail"),

    # reward
    path('reward/', reward.reward, name="reward"),
    path('reward/list/', reward.reward_list, name="reward_list"),
    path('reward/<int:person>/detail/', reward.reward_detail, name="reward_detail"),
    path('reward/add/', reward.reward_add, name="reward_add"),
    path('reward/<int:uid>/edit/', reward.reward_edit, name="reward_edit"),
    path('reward/<int:uid>/delete/', reward.reward_delete, name="reward_delete"),

]
